﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using KMS.Core.domain.model.project;
using KMS.Web.Views.Shared;
using KMS.Core.domain.model.post;

namespace KMS.Web.Views.Projects
{
    public class ProjectViewModel
    {
        //private Project _project;

        public IList<ResourceViewModel> Resources { get; set; }

        public string Name
        {
            get;
            set;
        }

        public ProjectViewModel(Project project)
        {
            Name = project.Name;
        }

        public ProjectViewModel(Project project, IList<Resource> resources) : this(project)
        {
            Resources = new List<ResourceViewModel>();
            foreach (var resource in resources)
            {
                Resources.Add(new ResourceViewModel(resource));
            }
        }

        public ProjectViewModel()
        {

        }
    }
}
